package com.example.mangroves.entity;

import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

@TableName("geo_types")
public class GeoType {

    private Integer id;
    private String name;
    private String description;
    private String unit;
    private Integer parentId;
    private Integer level;
    private String path;
    private Boolean leaf;
    private Date createTime;
    private Date updateTime;

    // Default constructor
    public GeoType() {}

    public GeoType(Integer id, String name, String description, String unit, Integer parentId, Integer level, String path, Boolean leaf, Date createTime, Date updateTime) {
        this.id = id;
        this.name = name;
        this.description = description;
        this.unit = unit;
        this.parentId = parentId;
        this.level = level;
        this.path = path;
        this.leaf = leaf;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }

    // Getters and Setters
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Boolean getLeaf() {
        return leaf;
    }

    public void setLeaf(Boolean leaf) {
        this.leaf = leaf;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    // ToString method for debugging and logging purposes
    @Override
    public String toString() {
        return "GeoType{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", description='" + description + '\'' +
                ", unit='" + unit + '\'' +
                ", parentId=" + parentId +
                ", level=" + level +
                ", path='" + path + '\'' +
                ", leaf=" + leaf +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
